<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta name="theme-color" content="#000000"/>
    <meta name="description" content="Web site created using create-react-app"/>
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png"/>
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json"/>
    <title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="text/javascript">
	let tid;
	const doc = document, docEl = doc.documentElement;
	const refreshRem = function () {
		const clientWidth = docEl.clientWidth;
		const clientHeight=docEl.clientHeight;
		if (clientWidth <= 1920) {
			docEl.style.fontSize = '10px'; //1rem  = 10px
		} else {
			let size= Number.parseInt(12 * (clientWidth / clientHeight)) / (clientWidth / 1920);
			docEl.style.fontSize = size + 'px';
		}
	};
	addEventListener('resize', function () {
		clearTimeout(tid);
		tid = setTimeout(refreshRem, 300);
	}, false);
	addEventListener('pageshow', function (e) {
		if (e.persisted) {
			clearTimeout(tid);
			tid = setTimeout(refreshRem, 300);
		}
	}, false);
	refreshRem();
</script>
</body>
</html>
